//采购单所有接口
import http from "@/utils/http2.js"
/**
 *保存采购单
 * @param {*} data
 * @returns
 */
export function savePurchase(data) {
  return http.post("/api/purchase", data);
}
/**
 *查询采购单
 * @param {*} data
 * @returns
 */
export function queryPurchase(data) {
  return http.post("/api/list",data)
}
/**
 *删除采购单
 * @param {*} data
 */
export function deletePurchase(data) {
  return http.get("/api/delete",data)
}
/**
 *查询明细列表
 * @param {*} data
 */
export function queryDetail(purchaseId) {
  return http.get("/api/purchaseDetail/detail", purchaseId)
}
export function getPurchase(id) {
  return http.get("/api/purchase?id="+id)
}
